#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging


async def logger_factory(app, handler):
    async def logger(request):
        logging.info('=' * 60 + 'Request: %s %s' % (request.method, request.path) + '=' * 60)
        return (await handler(request))

    return logger
